package com.intelligent.system.common.websocket;

import lombok.Data;

@Data
public class WebSocketMessage {
    private String type;    // 消息类型
    private String from;    // 发送者
    private String to;      // 接收者
    private String content; // 消息内容
    private Long timestamp; // 时间戳

    public WebSocketMessage() {
        this.timestamp = System.currentTimeMillis();
    }

    public WebSocketMessage(String type, String from, String to, String content) {
        this.type = type;
        this.from = from;
        this.to = to;
        this.content = content;
        this.timestamp = System.currentTimeMillis();
    }
}